package com.rds.material.dto;


import com.rds.common.api.material.domain.RdaPart;
import com.rds.common.api.material.domain.RdaPartsRel;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;
@Data
@AllArgsConstructor
public class MaterialBillAndRdaPartsRel implements Serializable {

    private Long mid;
    private String name;
    private String code;
    private Integer typeid;
    private Integer stateid;
    private String revision;
    private String units;
    private Integer ownerid;
    private Integer policyid;
    private Long projectid;
    private Long toid;

    private Long id;
    private String findnumber;
    private Long level;
    private Long parentid;
    private Long quantity;
    private String remark;

    private Boolean previousLevel;
    private String pageParams;
    private String url;
    private RdaPart rdaPart;


    public MaterialBillAndRdaPartsRel(RdaPartsRel rdaPartsRel) {
        this.mid = rdaPartsRel.getMaterialBill().getId();
        this.name = rdaPartsRel.getMaterialBill().getName();
        this.code = rdaPartsRel.getMaterialBill().getCode();
        this.units = rdaPartsRel.getMaterialBill().getUnits();
        this.revision = rdaPartsRel.getMaterialBill().getRevision();
        this.ownerid = rdaPartsRel.getMaterialBill().getOwnerid();
        this.typeid = rdaPartsRel.getMaterialBill().getTypeid();
        this.policyid = rdaPartsRel.getMaterialBill().getPolicyid();
        this.stateid = rdaPartsRel.getMaterialBill().getStateid();
        this.toid = rdaPartsRel.getToid();

        this.id = rdaPartsRel.getId();
        this.findnumber = rdaPartsRel.getFindnumber();
        this.level = rdaPartsRel.getLevel();
        this.parentid = rdaPartsRel.getParentId();
        this.quantity = rdaPartsRel.getQuantity();
        this.remark = rdaPartsRel.getRemark();
        this.projectid = rdaPartsRel.getToid();
    }

    public MaterialBillAndRdaPartsRel() {
    }
}
